<?php
/**
 * Created by PhpStorm.
 * User: eugene
 * Date: 2018/4/23
 * Time: 17:18
 */

namespace App\Models;


use App\Models\Member;
use Illuminate\Database\Eloquent\Model;

class Award extends Model
{
    protected $table='card_series_awards';
    
    public function getAwardIconAttribute()
    {
        if(!$this->attributes['award_icon'])return '';
        return starts_with($this->attributes['award_icon'],'http') ?
            $this->attributes['award_icon'] :
            config('filesystems.disks.admin.url').$this->attributes['award_icon'];
    }
    
}